From: Jay Belanger Date: Mon, 3 Dec 2012 04:46:49 +0000 (-0600) Subject: * lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix weekday number. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~844^2~9^2~90 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=77a7493589dd3c54cdcb96aeb6fa8b2bac485f09;p=emacs.git * lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix weekday number. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb14f1340df..99038a4adf9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-03 Jay Belanger + + * calc/calc-forms.el (math-date-to-iso-dt): Fix weekday number. + 2012-12-03 Leo Liu * files.el (dir-locals-read-from-file): Check file non-empty diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 197bc6acee5..5ce76b14d72 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -474,7 +474,8 @@ in the Gregorian calendar and the remaining part determines the time." (math-sub date (math-absolute-from-iso-dt year 1 1)) 7)) 1) - (cdr (math-idivmod date 7))))) + (let ((day (calcFunc-mod date 7))) + (if (= day 0) 7 day))))) (defun math-dt-to-date (dt) (or (integerp (nth 1 dt))